#ifndef __KEW_DECODE_H__
#define __KEW_DECODE_H__

#include <kew/kew.h>
#include "translationtable.h"

KEW_EXPORT KewTranslationTable *kew_decode_call_shape_table(KewBitReader *bit_reader);

KEW_EXPORT KewTranslationTable *kew_decode_selector_table(KewBitReader *bit_reader);

KEW_EXPORT KewCodeReference *kew_decode_reference(KewBitReader *bit_reader);

KEW_EXPORT KewCodeInstructionType kew_decode_instruction(KewBitReader *bit_reader);

KEW_EXPORT unsigned kew_decode_unsigned(KewBitReader *bit_reader);

KEW_EXPORT unsigned kew_decode_expression_slot(KewBitReader *bit_reader, unsigned current_expression_slot);

KEW_EXPORT KewCodeBlock *kew_decode_block(KewBitReader *bit_reader, KewTranslationTable *selector_translation_table, KewTranslationTable *call_shape_translation_table);

KEW_EXPORT void kew_decode_bitcode(KewBitReader *bit_reader);

#endif